import MarkdownIt from 'markdown-it';
import axios from "axios";
const mdParser = new MarkdownIt(/* Markdown-it options */);
function renderMarkdown(mdURL) {
    const tmpInstance = axios.create({withCredentials: false,});
    return tmpInstance.get(mdURL).then((res)=>{
        let renderString = mdParser.render(res['data']);
        let replaced = renderString.replace(/<br>/g, '<br/>');
        return replaced;
    });
}
export default renderMarkdown;